/**
 * @Auther: ChenforCode
 * @Date: 2018/9/11 12:07
 * @Description:
 */
package cn.chenforcode.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class StuAdmin {
    private String saname;
    private String satel;
    private String sapwd;

    @Id
    @Column(name = "SANAME")
    public String getSaname() {
        return saname;
    }

    public void setSaname(String saname) {
        this.saname = saname;
    }

    @Basic
    @Column(name = "SATEL")
    public String getSatel() {
        return satel;
    }

    public void setSatel(String satel) {
        this.satel = satel;
    }

    @Basic
    @Column(name = "SAPWD")
    public String getSapwd() {
        return sapwd;
    }

    public void setSapwd(String sapwd) {
        this.sapwd = sapwd;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        StuAdmin stuadmin = (StuAdmin) o;

        if (saname != null ? !saname.equals(stuadmin.saname) : stuadmin.saname != null) return false;
        if (satel != null ? !satel.equals(stuadmin.satel) : stuadmin.satel != null) return false;
        if (sapwd != null ? !sapwd.equals(stuadmin.sapwd) : stuadmin.sapwd != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = saname != null ? saname.hashCode() : 0;
        result = 31 * result + (satel != null ? satel.hashCode() : 0);
        result = 31 * result + (sapwd != null ? sapwd.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "StuAdmin{" +
                "saname='" + saname + '\'' +
                ", satel='" + satel + '\'' +
                ", sapwd='" + sapwd + '\'' +
                '}';
    }

    public StuAdmin(String saname, String satel, String sapwd) {
        this.saname = saname;
        this.satel = satel;
        this.sapwd = sapwd;
    }

    public StuAdmin() {
    }
}
